Skip to content

feat(admin-nav): move config items into a sidebar accordion menu - #1534

Merged
Rushaway merged 3 commits into
sbpp:mainfrom
maxijabase:feat/1490-admin-sidebar-accordion
Aug 3, 2026
Merged

feat(admin-nav): move config items into a sidebar accordion menu#1534
Rushaway merged 3 commits into
sbpp:mainfrom
maxijabase:feat/1490-admin-sidebar-accordion

Conversation

@maxijabase

Copy link
Copy Markdown
Contributor

Summary

Closes #1490

Admin section nav no longer lives in a second rail next to the main sidebar. Pattern A pages (?section=…) keep the same URLs and routing, but their children now open as accordions under Admins / Servers / Bans / Groups / Settings / Mods in the main sidebar. That frees ~14rem of content width and kills the double-menu feel the issue called out.

  • Sbpp\View\AdminNavCatalog is the single source for section catalogs (navbar accordion + page-handler slug defaults). Permission and config.enable* gates match the old AdminTabs filter.
  • AdminTabs with a non-empty tab list is a no-op. Empty calls still render the edit-* Back link.
  • Duplicate header Add … CTAs on servers / admins lists are gone. Those destinations already sit in the accordion.
  • Accordion chrome: nested indent, vertical rail under the parent icon, chevron on the summary.
  • Protests / submissions Current|Archive chips share .page-section inset so they line up with the page body after the second rail went away.

Docs (AGENTS.md, ARCHITECTURE.md), E2E selectors, and PHPUnit (including AdminNavCatalogTest) updated for the new testids (nav-admin-<endpoint>-<slug>).

image image

Test plan

  • Log in as owner. Expand Admins / Servers / Bans / Settings. Confirm children render, active leaf has aria-current="page", category summary does not when children exist.
  • Visit ?p=admin&c=servers&section=add and ?p=admin&c=admins&section=add-admin. Confirm no second left rail and no duplicate Add button in the page header.
  • Ban protests / submissions. Confirm Current|Archive chips align with the heading and empty state (not flush against the sidebar).
  • Partial-permission admin (e.g. list servers only). Confirm accordion children match reachable sections.
  • Toggle off config.enableprotest / config.enablesubmit / config.enablegroupbanning. Confirm those Bans children disappear from the accordion.
  • Edit-* page (e.g. edit ban). Confirm Back link still works.
  • ./sbpp.sh phpstan and ./sbpp.sh test --filter=AdminNavCatalogTest|AdminBansFeatureToggleTest|AdminAdminsSearchTest
  • ./sbpp.sh e2e --grep "admin-tabs|sidebar-sticky|admin-admins-density|routing-truthiness"

@Rushaway

Rushaway commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Can you resolve conflicts @maxijabase ? 👍

Keep AdminNavCatalog::sectionsFor for admin section slugs; drop the
inline AdminTabs catalog that landed on main via sbpp#1532.
@Rushaway Rushaway changed the title Move admin interface configuration items into accordion menu feat(admin-nav): move config items into a sidebar accordion menu Aug 3, 2026
@Rushaway
Rushaway added this pull request to the merge queue Aug 3, 2026
Merged via the queue into sbpp:main with commit 4e53676 Aug 3, 2026
7 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move admin interface configuration items into accordion menu

2 participants